import {
    request
} from "./request";
import qs from "qs";


// app 用户登录
export function login(obj) {
    return request({
        url: "user/login",
        method: "post",
        data: qs.stringify(obj)
    });
}
//  业务员  登录
export function advLogin(obj) {
    return request({
        url: "user/advLogin",
        method: "post",
        data: qs.stringify(obj)
    });
}


// 首页获取门店列表
export function listSHop(obj) {
    return request({
        url: "shop/listSHop",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 根据条件 获取 门店列表
export function searchShop(obj) {
    return request({
        url: "shop/searchShop",
        method: "post",
        data: qs.stringify(obj),
    });
}


// 添加用户 投放广告意向单
export function addOrder(obj) {
    return request({
        url: "user/addOrder",
        method: "post",
        data: obj,
    });
}

// 获取我的投放记录
export function listMyUserPut(obj) {
    return request({
        url: "user/listMyUserPut",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 根据投放记录   获取   投放的门店
export function listMyPutShop(obj) {
    return request({
        url: "user/listMyPutShop",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 支付定金
export function payOrder(obj) {
    return request({
        url: "user/payOrder",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 工人打卡
export function addUserVisit(obj) {
    return request({
        url: "user/addUserVisit",
        method: "post",
        data: obj,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    });
}

// 获取我的安装
export function shopVisitCount(obj) {
    return request({
        url: "user/shopVisitCount",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 获取我的余额
export function UserBalance(obj) {
    return request({
        url: "user/UserBalance",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 获取 工人 发起提现记录
export function MylistCommission(obj) {
    return request({
        url: "commission/MylistCommission",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 获取 工人  入账记录
export function MyBalanceList(obj) {
    return request({
        url: "shop/MyBalanceList",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 工人 提现申请
export function commitCommission(obj) {
    return request({
        url: "commission/commitCommission",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 获取合作客户
export function listHcustomer(obj) {
    return request({
        url: "shop/listHcustomer",
        method: "post",
        data: qs.stringify(obj)
    });
}

// 获取 业务员二维码
export function listUserImg(obj) {
    return request({
        url: "user/listUserImg",
        method: "post",
        data: qs.stringify(obj)
    });
}
// 修改密码
export function updatePass(obj) {
    return request({
        url: "user/updatePass",
        method: "post",
        data: qs.stringify(obj)
    });
}

